

from django.core.files.storage import Storage
from django.conf import settings

class MyStorage(Storage):

    # def __init__(self, option=None):
    #     if not option:
    #         option = settings.CUSTOM_STORAGE_OPTIONS

    def _open(self, name, mode='rb'):
        pass

    def _save(self, name, content, max_length=None):
        pass

    def url(self, name):
        # 默认url 是返回name
        # http://ip:port/ + name
        return "http://192.168.184.130:8888/" + name